package com.kuaiprint.main;

import java.util.List;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;

public class ItemChooseActivity extends FragmentActivity {

	private LinearLayout printDaying;
	private LinearLayout printFuying;
	private LinearLayout printGongchengtu;
	private LinearLayout printZhuangding;
	private LinearLayout printPenghui;
	private LinearLayout printXiezheng;
	private LinearLayout printHuace;
	private LinearLayout printMingpian;
	private LinearLayout printZhaoxiang;
	private LinearLayout printChongxi;
	private LinearLayout printBiaoshu;
	private LinearLayout printCaipu;
	private LinearLayout printChuanzheng;
	private LinearLayout printSaomiao;
	private LinearLayout printDingzhi;
	private LinearLayout printDazi;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.item_choose);
		
		initView();
		setClickListener();
	}
 
	/**
	 * 设置16个按钮的监听以及跳转到相应的页面、
	 */
	private void setClickListener() {
		// TODO Auto-generated method stub
		printDaying.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
				Bundle bundle =new Bundle();
				bundle.putInt("type", 1);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
				
			}
		});
		printDazi.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 2);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printDingzhi.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 3);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printBiaoshu.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 4);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printCaipu.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 5);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printChongxi.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 6);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printChuanzheng.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 7);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printFuying.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 8);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printGongchengtu.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 9);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		
		printHuace.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 10);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printMingpian.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 11);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printPenghui.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 12);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printSaomiao.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 13);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printXiezheng.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 14);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printZhaoxiang.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 15);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		printZhuangding.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Bundle bundle =new Bundle();
				bundle.putInt("type", 16);
				Intent intent =new Intent(getApplicationContext(),PrintInfoActivity.class);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
	}

	private void initView() {
		// TODO Auto-generated method stub
		printDaying =(LinearLayout) findViewById(R.id.print_daying);
		printDazi = (LinearLayout) findViewById(R.id.print_dazi);
		printDingzhi = (LinearLayout) findViewById(R.id.print_dingzhi);
		printBiaoshu = (LinearLayout) findViewById(R.id.print_biaoshu);
		printCaipu = (LinearLayout) findViewById(R.id.print_caipu);
		printChongxi = (LinearLayout) findViewById(R.id.print_chongxi);
		printChuanzheng = (LinearLayout) findViewById(R.id.print_chuanzheng);
		printFuying = (LinearLayout) findViewById(R.id.print_fuying);
		printGongchengtu = (LinearLayout) findViewById(R.id.print_gongchengtu);
		printHuace = (LinearLayout) findViewById(R.id.print_huace);
		printMingpian = (LinearLayout) findViewById(R.id.print_mingpian);
		printPenghui = (LinearLayout) findViewById(R.id.print_penghui);
		printSaomiao = (LinearLayout) findViewById(R.id.print_saomiao);
		printXiezheng = (LinearLayout) findViewById(R.id.print_xiezheng);
		printZhaoxiang = (LinearLayout) findViewById(R.id.print_zhangxiang);
		printZhuangding = (LinearLayout) findViewById(R.id.print_zhuangding);
		
		
		
	}

	public void back(View view) {
		this.finish();
	}
	
	
}